<gm:page title="Cars" authenticate="true">

  <table width=100%>
    <tr>
      <td width="50%">
        <gm:list id="Cars" data="${app}/Cars" template="simpleCars"/>
      </td>
      <td width="50%">
        <gm:list id="jobs" data="${Cars}/jobs" template="simpleJobs">
          <gm:handleEvent src="Cars"/>
        </gm:list>
      </td>
     </tr>
  </table>

  <gm:template id="simpleCars">
    <table>
      <tr repeat="true">
        <td><gm:text ref="atom:carName"/></td>
        <td><gm:text ref="atom:carPos"/></td>
        <td><gm:date time="true" ref="atom:carLast"/></td>
        <td><gm:editButtons/></td>
      </tr>
    </table>
    <gm:create label="New Car"/>
  </gm:template>

  <gm:template id="simpleJobs">
    <table>
      <tr repeat="true">
        <td><gm:text ref="atom:jobName"/></td>
        <td><gm:text ref="atom:jobPos"/></td>
        <td><gm:date time="true" ref="atom:Jobdue/@startTime"/></td>
        <td><gm:date time="true" ref="atom:Jobadded/@startTime"/></td>
        <td><gm:editButtons/></td>
      </tr>
    </table>
    <gm:create label="New Job"/>
  </gm:template>

</gm:page>
